package com.msb.mall.core.entity.product;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.msb.mall.core.valid.groups.AddGroupsInterface;
import com.msb.mall.core.valid.groups.UpdateGroupsInterface;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * 品牌分类关联
 *  此实体类 不做品牌名称和分类名称的绑定，只用品牌ID和分类ID关联即可，因此对于品牌和分类的更新动作，就不用同步了
 *
 * @author leixu
 * @email xuleiwolf@163.com
 * @date 2024-04-19 10:08:56
 */
@Data
@TableName("pms_category_brand_relation")
public class CategoryBrandRelationEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Null(message = "品牌分类关联ID必须为空", groups = {AddGroupsInterface.class})
    @NotNull(message = "品牌分类关联ID必须不为空", groups = {UpdateGroupsInterface.class})
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 品牌id
     */
    @NotNull(message = "品牌id不能为空", groups = {AddGroupsInterface.class})
    @NotNull(message = "品牌id不能为空", groups = {UpdateGroupsInterface.class})
    private Long brandId;
    /**
     * 分类id
     */
    @NotNull(message = "分类id不能为空", groups = {AddGroupsInterface.class})
    @NotNull(message = "分类id不能为空", groups = {UpdateGroupsInterface.class})
    private Long catelogId;
    /**
     *
     */
    private String brandName;
    /**
     *
     */
    private String catelogName;

}
